<template>
    <div class="comment-wrap">
        <div class="user-comment-wrap">
            <div class="user-comment-item" v-for="item in commentData" :key="item">
            <div class="user-info-wrap flex-yc flex-xbt">
                <div class="flex-yc">
                <img class="avatar" src="" />
                <div class="flex-y flex-xc">
                    <div class="username flex-xc">
                    这里是用户昵称
                    <img src="@/pages/mall/assets/images/vip-icon.png" />
                    </div>
                    <span class="comment-date">2020.02.03 13:00:00</span>
                </div>
                </div>
                <div class="comment-wrap-r flex-yc">
                评价：
                <el-rate v-model="item.num" disabled  :colors="['#f7ba2a', '#f7ba2a', '#f7ba2a']"/>
                </div>
            </div>
            <p class="comment-con">
                这里是评论正文这里是评论正文这里是评论正文这里是评论正文这里是评论正文这里是评论正文这里是评论正文这里是评论正文这里是评论正文这里是评论正文这里是评论正文这里是评论正文这里是评论正文这里是评论正文这里是评论正文这里是评论正文这里是评论正文这里是评论正文
            </p>
            <div class="comment-img-wrap flex-yc">
                <img src="" />
                <img src="" />
                <img src="" />
            </div>
            <span class="sku">「商品名称」+sku</span>
            </div>
    </div>
</div>
</template>
<script setup lang="ts">
import Breadcrumb from '@/pages/mall/components/BreadcrumbCom.vue'
import CommDialog from '@/pages/mall/components/CommDialog.vue'
import { reactive, ref,computed } from 'vue'
import { ElTable } from 'element-plus'
import { useRoute, useRouter } from 'vue-router';
import {navigateToRoute} from '@/utils/utils'
const router = useRouter()

const visible = ref(false)


interface cargoods {
  property: string
  num: string
  totalPrice: string | number
}
const commentData = reactive([
  {
    title: '这里是产品标题这里是产品标题这里是产品标题产品标题这里是产品标题',
    category: '分类：年会员（优惠券十张）',
    type: '会员订单',
    price: '¥ 3333.00',
    num: 1,
    kuc:20,
    totalPrice: '333.00',
  },
  {
    title: '这里是产品标题这里是产品标题这里是产品标题产品标题这里是产品标题',
    category: '分类：年会员（优惠券十张）',
    type: '会员订单',
    price: '¥ 3333.00',
    num: 1,
    kucun:20,
    totalPrice: '333.00',
  },
  {
    title: '这里是产品标题这里是产品标题这里是产品标题产品标题这里是产品标题',
    category: '分类：年会员（优惠券十张）',
    type: '会员订单',
    price: '¥ 3333.00',
    num: 1,
    kucun:20,
    totalPrice: '333.00',
  },
  {
    title: '这里是产品标题这里是产品标题这里是产品标题产品标题这里是产品标题',
    category: '分类：年会员（优惠券十张）',
    type: '会员订单',
    price: '¥ 3333.00',
    num: 1,
    kucun:20,
    totalPrice: '333.00',
  },
  {
    title: '这里是产品标题这里是产品标题这里是产品标题产品标题这里是产品标题',
    category: '分类：年会员（优惠券十张）',
    type: '会员订单',
    price: '¥ 3333.00',
    num: 1,
    kucun:20,
    totalPrice: '333.00',
  },
  {
    title: '这里是产品标题这里是产品标题这里是产品标题产品标题这里是产品标题',
    category: '分类：年会员（优惠券十张）',
    type: '会员订单',
    price: '¥ 3333.00',
    kucun:20,
    num: 1,
    totalPrice: '333.00',
  },
  {
    title: '这里是产品标题这里是产品标题这里是产品标题产品标题这里是产品标题',
    category: '分类：年会员（优惠券十张）',
    type: '会员订单',
    kucun:20,
    price: '¥ 3333.00',
    num: 1,
    totalPrice: '333.00',
  },
])

const multipleSelection = ref<cargoods[]>([])
  
const handleSelectionChange = (val: cargoods[]) => {
  console.log(val,'val')
  multipleSelection.value = val
}

const golink = (id) => {
    router.push({ path: '/member/mall/shopedit', query: { id } })
};
const delSubmit=()=>{
  // let selectedRows = carTable.value?.getSelectedRows(); // 使用可选链操作符来安全地访问  
  // console.log(selectedRows)
  console.log(multipleSelection.value,'11')
}
const onSubmitCar = () => {
  router.push('/mall/goods/order')
}

</script>
<style scoped lang="scss">
  .comment-wrap {
    padding-bottom: 50px;
    padding-left: 24px;
    .user-comment-wrap {
      .user-comment-item {
        padding: 30px 0;

        & + .user-comment-item {
          border-top: 1px solid $borderCol;
        }

        .user-info-wrap {
          margin-bottom: 20px;

          .avatar {
            width: 58px;
            height: 58px;
            margin-right: 8px;
            background-color: #d9d9d9;
            border-radius: 50%;
          }

          .username {
            margin-bottom: 8px;
            font-size: 16px;
            font-weight: 600;
            color: #040724;

            > img {
              height: 13px;
              margin-left: 5px;
            }
          }
          :deep{
            .el-rate {
                color: #f7ba2a;
            }
          }
          .comment-date {
            font-size: 14px;
            color: #040724;
          }

          .comment-wrap-r {
            font-size: 14px;
            color: #9ba1a8;
          }
        }

        .comment-con {
          font-size: 14px;
          line-height: 24px;
          color: #5f6085;
        }

        .comment-img-wrap {
          margin: 8px 0 17px;

          > img {
            flex-wrap: wrap;
            width: 94px;
            height: 94px;
            margin-right: 8px;
            background-color: #d9d9d9;
            border-radius: 4px;
          }
        }

        .sku {
          font-size: 14px;
          color: #040724;
        }
      }
    }
  }
</style>
